package com.ktjy.mapper;

import com.baomidou.mybatisplus.annotation.OrderBy;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktjy.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ktjy.entity.vo.SysUserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liuqiaomiao
 * @since 2024-03-01
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @ResultMap("sysUserVoMap")
    @Select("SELECT u.*,r.* FROM sys_user as u left join sys_role as r on u.usr_role_id=r.role_id")

    Page pageList(Page page, @Param("ew") Wrapper<SysUserVo> wrapper);
}
